import request from '@/utils/request'
//预约时段列表
export function prepareTimetable(data) {
    return request({
      url: 'prepare/timetable',
      method: 'get',
      params: data,
      headers: {
        showLoading: true
      }
    })
  }
//预约时段状态
export function timetableUpdatestatus(data) {
    return request({
      url: 'prepare/timetable/updatestatus',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//路线下拉
export function prepareLineOption(data) {
    return request({
      url: 'prepare/line/option',
      method: 'get',
      params: data,
      headers: {
        showLoading: false
      }
    })
  }
//时段新增
export function timetableCreate(data) {
    return request({
      url: 'prepare/timetable/create',
      method: 'post',
     data,
      headers: {
        showLoading: false
      }
    })
  }
//时段编辑
export function timetableUpdate(data) {
    return request({
      url: 'prepare/timetable/update',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//时段详情
export function timetableRead(data) {
    return request({
      url: 'prepare/timetable/read',
      method: 'get',
      params: data,
      headers:{
        'showLoading':true,
        'loadingTarget':'.innerLoding'
      }
    })
  }
//线路列表
export function prepareLine(data) {
    return request({
      url: 'prepare/line',
      method: 'get',
      params: data,
      headers: {
        showLoading: true
      }
    })
  }

//线路新增
export function prepareLineCreate(data) {
    return request({
      url: 'prepare/line/create',
      method: 'post',
       data,
      headers: {
        showLoading: false
      }
    })
  }
//线路编辑
export function prepareLineUpdate(data) {
    return request({
      url: 'prepare/line/update',
      method: 'put',
       data,
      headers: {
        showLoading: false
      }
    })
  }
//线路编辑
export function prepareLineRead(data) {
    return request({
      url: 'prepare/line/read',
      method: 'get',
      params: data,
      headers:{
        'showLoading':true,
        'loadingTarget':'.innerLoding'
      }
    })
  }
  //线路删除
export function prepareLineDelete(data) {
  return request({
    url: 'prepare/line/delete',
    method: 'delete',
    data,
    headers: {
      showLoading: false
    }
  })
}
  //时段删除
export function prepareTimetableDelete(data) {
  return request({
    url: 'prepare/timetable/delete',
    method: 'delete',
    data,
    headers: {
      showLoading: false
    }
  })
}
//地点列表
export function preparePoint(data) {
  return request({
    url: 'prepare/point',
    method: 'get',
    params: data,
    headers: {
      showLoading: true
    }
  })
}

//地点新增
export function preparePointCreate(data) {
  return request({
    url: 'prepare/point/create',
    method: 'post',
     data,
    headers: {
      showLoading: false
    }
  })
}
//地点编辑
export function preparePointUpdate(data) {
  return request({
    url: 'prepare/point/update',
    method: 'put',
     data,
    headers: {
      showLoading: false
    }
  })
}
//地点编辑
export function preparePointRead(data) {
  return request({
    url: 'prepare/point/read',
    method: 'get',
    params: data,
    headers:{
      'showLoading':true,
      'loadingTarget':'.innerLoding'
    }
  })
}
  //地点删除
  export function preparePointDelete(data) {
    return request({
      url: 'prepare/point/delete',
      method: 'delete',
      data,
      headers: {
        showLoading: false
      }
    })
  }

  //预约时段状态
export function pointUpdatestatus(data) {
  return request({
    url: 'prepare/point/updatestatus',
    method: 'put',
    data,
    headers: {
      showLoading: false
    }
  })
}
  //预约时段状态
export function pointupdateisphoto(data) {
  return request({
    url: 'prepare/point/updateisphoto',
    method: 'put',
    data,
    headers: {
      showLoading: false
    }
  })
}
 
export function pointoption(data) {
  return request({
    url: 'prepare/point/option',
    method: 'get',
    params:data,
    headers: {
      showLoading: false
    }
  })
}
export function hospitalOption(data) {
  return request({
    url: 'hospital/option',
    method: 'get',
    params:data,
    headers: {
      showLoading: false
    }
  })
}



//套餐列表
export function preparepackage(data) {
  return request({
    url: 'prepare/package',
    method: 'get',
    params: data,
    headers: {
      showLoading: true
    }
  })
}

//新增
export function packageCreate(data) {
  return request({
    url: 'prepare/package/create',
    method: 'post',
     data,
    headers: {
      showLoading: false
    }
  })
}
//编辑
export function packageUpdate(data) {
  return request({
    url: 'prepare/package/update',
    method: 'put',
     data,
    headers: {
      showLoading: false
    }
  })
}
//编辑
export function packageRead(data) {
  return request({
    url: 'prepare/package/read',
    method: 'get',
    params: data,
    headers:{
      'showLoading':true,
      'loadingTarget':'.innerLoding'
    }
  })
}
//删除
export function packageDelete(data) {
return request({
  url: 'prepare/package/delete',
  method: 'delete',
  data,
  headers: {
    showLoading: false
  }
})
}
//排序
export function packageUpdateSort(data) {
return request({
  url: 'prepare/package/updateSort',
  method: 'put',
  data,
  headers: {
    showLoading: false
  }
})
}

  //状态
  export function packageUpdatestatus(data) {
    return request({
      url: 'prepare/package/updatestatus',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
   //套餐记录
export function preparepackageRecord(data) {
  return request({
    url: 'prepare/package/record',
    method: 'get',
    params: data,
    headers: {
      showLoading: true
    }
  })
}